/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package irsystem.scenario.method;

import irsystem.collection.CISI;
import java.util.List;

/**
 *
 * @author Cerulean
 */
public class StopwordRemoval
{
    List<String> words;
    CISI cisi;

    public StopwordRemoval(List<String> words, CISI cisi)
    {
        this.words = words;
        this.cisi = cisi;
    }
    
    public List<String> process()
    {
        for(int j=0;j<words.size();j++)
        {
            if(cisi.isStopword(words.get(j)))
            {
                words.remove(j);
                j--;
            }
        }
        return words;
    }
}
